[BLKTAP][XEND] Fix blktap to work with a bootloader
authorAndrew Warfield <andy@xensource.com>
Thu, 28 Sep 2006 19:12:59 +0000 (12:12 -0700)
committerAndrew Warfield <andy@xensource.com>
Thu, 28 Sep 2006 19:12:59 +0000 (12:12 -0700)
commit8e7cc683c5c25acf26ec48b6c20d3da17a0089a1
tree11fe140f59b45d85c5170ae71e2cc3cb3218dab6
parent577a31b661349769ba54378cb2979a9d3ecad4ed
[BLKTAP][XEND] Fix blktap to work with a bootloader
If a Xen guest has a bootloader configured, then it will fail to start
on a blktap image.  The problem is blkdev_uname_to_file, which cannot
parse the "tap:aio:$filename" image strings: it tries to split the
string apart at ":" and assign the result to a 2-tuple, and this
results in a python error if the split results in three or more
strings.

The fix is to split only at the first ":", and then to split again
if we detect "tap:" as the image type.

Signed-off-by: Stephen Tweedie <sct@redhat.com>
tools/python/xen/util/blkif.py